'use strict';
const {
  Model
} = require('sequelize');
module.exports = (sequelize, DataTypes) => {
  class enterprise extends Model {
    /**
     * Helper method for defining associations.
     * This method is not a part of Sequelize lifecycle.
     * The `models/index` file will call this method automatically.
     */
    static associate(models) {
      // define association here
    }
  }
  enterprise.init({
    key:{
      allowNull:true,
      type: DataTypes.INTEGER,
      primaryKey: true,
      autoIncrement: true
    },
    enterpriseName: DataTypes.STRING,
    status: DataTypes.STRING,
    id: DataTypes.STRING,
    province: DataTypes.STRING,
    city: DataTypes.STRING,
    area: DataTypes.STRING,
    legalRep: DataTypes.STRING,
    regCapital: DataTypes.STRING,
    estiblishTime: DataTypes.STRING,
    historyName: DataTypes.STRING,
    industry: DataTypes.STRING,
    companyOrgType: DataTypes.STRING,
    socialStaffNum: DataTypes.STRING,
    businessScope: DataTypes.STRING,
    regLocation: DataTypes.STRING,
    newLocation: DataTypes.STRING,
    email: DataTypes.STRING,
    certEmail: DataTypes.STRING,
    website: DataTypes.STRING,
    phone1: DataTypes.STRING,
    phone2: DataTypes.STRING,
    phone3: DataTypes.STRING,
    phone4: DataTypes.STRING,
    phone5: DataTypes.STRING,
    phone6: DataTypes.STRING,
    phone7: DataTypes.STRING,
    phone8: DataTypes.STRING,
    phone9: DataTypes.STRING,
    phone10: DataTypes.STRING,
    webemail: DataTypes.STRING,
    webphone: DataTypes.STRING,
    webaddress: DataTypes.STRING,
    isget: DataTypes.STRING,
    remark: DataTypes.STRING,
    result: DataTypes.STRING,
  }, {
    sequelize,
    modelName: 'enterprise',
    "timestamps": false
  });
  return enterprise;
};